package com.ruoyi.fee.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fee.mapper.PropertyBillMapper;
import com.ruoyi.fee.domain.PropertyBill;
import com.ruoyi.fee.service.IPropertyBillService;

/**
 * 账单信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-27
 */
@Service
public class PropertyBillServiceImpl implements IPropertyBillService 
{
    @Autowired
    private PropertyBillMapper propertyBillMapper;

    /**
     * 查询账单信息
     * 
     * @param billId 账单信息主键
     * @return 账单信息
     */
    @Override
    public PropertyBill selectPropertyBillByBillId(Long billId)
    {
        return propertyBillMapper.selectPropertyBillByBillId(billId);
    }

    /**
     * 查询账单信息列表
     * 
     * @param propertyBill 账单信息
     * @return 账单信息
     */
    @Override
    public List<PropertyBill> selectPropertyBillList(PropertyBill propertyBill)
    {
        return propertyBillMapper.selectPropertyBillList(propertyBill);
    }

    /**
     * 新增账单信息
     * 
     * @param propertyBill 账单信息
     * @return 结果
     */
    @Override
    public int insertPropertyBill(PropertyBill propertyBill)
    {
        propertyBill.setCreateTime(DateUtils.getNowDate());
        return propertyBillMapper.insertPropertyBill(propertyBill);
    }

    /**
     * 修改账单信息
     * 
     * @param propertyBill 账单信息
     * @return 结果
     */
    @Override
    public int updatePropertyBill(PropertyBill propertyBill)
    {
        return propertyBillMapper.updatePropertyBill(propertyBill);
    }

    /**
     * 批量删除账单信息
     * 
     * @param billIds 需要删除的账单信息主键
     * @return 结果
     */
    @Override
    public int deletePropertyBillByBillIds(Long[] billIds)
    {
        return propertyBillMapper.deletePropertyBillByBillIds(billIds);
    }

    /**
     * 删除账单信息信息
     * 
     * @param billId 账单信息主键
     * @return 结果
     */
    @Override
    public int deletePropertyBillByBillId(Long billId)
    {
        return propertyBillMapper.deletePropertyBillByBillId(billId);
    }
}
